﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Warehouse.DataAccess
{
    public partial class SupplierPrice : CustomeEntity<SupplierPrice>
    {
        public static SupplierPrice[] Search(int supplierId)
        {
            using (WarehouseClassesDataContext context = new WarehouseClassesDataContext())
            {
                return context.SupplierPrice.Where(p => p.SupplierID == supplierId).ToArray();
            }
        }

        protected override System.Linq.Expressions.Expression<Func<SupplierPrice, bool>> GetPredicate()
        {
            return p => p.ProductSpecificationID == this.ProductSpecificationID && p.SupplierID == this.SupplierID;
        }
    }
}
